<?php
/**
* @package YARBB
* @copyright Авторские права (C) 2009 www.yar-it.com. Все права защищены.
* @license Лицензия http://www.gnu.org/licenses/gpl-2.0.htm GNU/GPL, или help/license.php
* YARBB! - свободное программное обеспечение распространяемое по условиям лицензии GNU/GPL
* Для получения информации о используемых расширениях и замечаний об авторском праве, смотрите файл copyright.php.
*/
	defined( '_JEXEC' ) or die( 'Restricted Access' );
	$dispclr = $this->theme;
	global $ybbConfig;
	$userArray = array();
?>
<script language="javascript" type="text/javascript">

function submitbutton()
{
	var form = document.FrmPostlist;
	form.submit();
	return;
}
</script>

<form action="<?php echo $this->action; ?>" method="post" name="FrmPostlist" id="FrmPostlist">
  <div class="ybbmaindiv">
    <table class="ybbnormaltable" cellpadding="0" cellspacing="0">
      <tr>
        <td class="ybbtopleft"></td>
        <td class="ybbtopmiddle">&nbsp;<?php echo $ybbConfig->boardname;?> </td>
        <td class="ybbtopright"></td>
      </tr>
      <tr>
        <td class="ybbleftbody"></td>
        <td class="ybbheaderrow"><table class="ybbnormaltable" cellpadding="0" cellspacing="5">
            <tr>
             <td><div id="yarbb_menu">
                <ul id="ybbmenu">
                  <?php echo $this->userprofile['home']; ?>
                  <li class="node"><a>Инструменты</a>
                    <ul>
                      <?php echo $this->userprofile['latest']; ?> 
					  <?php echo $this->userprofile['link']; ?> 
					  <?php echo $this->userprofile['mylist']; ?> 
					  <?php echo $this->userprofile['approval']; ?>
                    </ul>
                  </li>
                </ul>
              </div></td>
             
              <td class="ybbheaderusername"><?php echo JText::_('WELCOME') . ' ' . $this->userprofile['boardusername']; ?></td>
              <td class="ybbheaderavatar"><?php echo $this->userprofile['thumb']; ?></td>
            </tr>
          </table></td>
        <td class="ybbrightbody"></td>
      </tr>
      <?php foreach($this->sticky as $rec) { ?>
      <tr>
        <td class="ybbleftbody"></td>
        <td class="ybbheaderrow"><table class="ybbnormaltable" cellpadding="0" cellspacing="0">
            <tr>
              <td class="ybbtopicicon"><img src="<?php echo YARBB_ASSETS_URL_THEME.'/'.$dispclr; ?>/img/sticky<?php echo $rec->topic_type; ?>.gif" class="ybbiconimg" /></td>
              <td class="ybblinetop"><a href="<?php echo JRoute::_('index.php?option=com_yarbb&view=postlist&forum=' . (int)$rec->forum_id . '&topic=' . (int)$rec->id.'&Itemid=' . $ybbConfig->itemid ); ?>"> <b><?php echo $this->escape($rec->post_subject); ?></b> </a>&nbsp; </td>
              <td class="ybbfrmlast" ><?php
                            if( $rec->post_time != 0 ) {
                                if( $rec->post_user > 0 ) {
                                    if( isset( $userArray[$rec->post_user])) {
                                        $uname = $userArray[$rec->post_user];
                                    } else {
                                        $uname = yarbbHelperConfig::getUserName( $rec->post_user );
                                        $userArray[$rec->post_user] = $uname;
                                    }
                                } else {
                                    $uname = $rec->post_username;
                                }
                            }

							echo JText::_('POST_LIST_BY') . '&nbsp;<b>'. $uname . '</b>&nbsp;' . JText::_('POST_LIST_ON') . '&nbsp;' .
								JHTML::_('date', $rec->post_time + $ybbConfig->timeoffset, $ybbConfig->dateformat);
                        ?>
              </td>
            </tr>
          </table></td>
        <td class="ybbrightbody"></td>
      </tr>
      <?php }	?>
      <tr class="ybbtablefooter">
        <td class="ybbbotleft"></td>
        <td class="ybbbotmiddle"></td>
        <td class="ybbbotright"></td>
      </tr>
      <tr>
        <td colspan="3" class="ybbcolspacer"></td>
      </tr>
      <tr>
        <td class="ybbtopleft"></td>
        <td class="ybbtopmiddle">&nbsp;<?php echo JText::_('REPORT_TO_MODERATOR'); ?></td>
        <td class="ybbtopright"></td>
      </tr>
      <tr>
        <td class="ybbleftbody"></td>
        <td><table class="ybbnormaltable" cellpadding="0" cellspacing="2">
            <tr>
              <td class="ybbmovcap"><br />
              <td></td>
            </tr>
            <tr>
              <td class="ybbmovcap"><?php echo JText::_('FORUM'); ?>:</td>
              <td><?php echo $this->forumname; ?></td>
            </tr>
            <tr>
              <td class="ybbmovcap"><?php echo JText::_('TOPIC_P'); ?></td>
              <td><?php echo $this->items[0]->post_subject; ?></td>
            </tr>
            <tr>
              <td class="ybbmovcap"><br />
              <td></td>
            </tr>
            <tr>
              <td class="ybbmovcap"><?php echo JText::_('REPORT_TITLE'); ?>:</td>
              <td><input type="text" id="reporttitle" name="reporttitle" size="52" /></td>
            </tr>
            <tr>
              <td class="ybbmovcap"><br />
              <td></td>
            </tr>
            <tr>
              <td class="ybbmovcap"><?php echo JText::_('REPORT_TEXT'); ?>:</td>
              <td><textarea id="reporttext" name="reporttext"  cols="40" rows="10"></textarea></td>
            </tr>
            <tr>
              <td class="ybbmovcap"><br />
              <td></td>
            </tr>
            <tr>
              <td class="ybbmovcap"></td>
              <td><a rel="nofollow" class="ovalbutton" href="#" onclick='submitbutton(); return false;'> <span><?php echo JText::_('REPORT'); ?></span> </a> <a rel="nofollow" class="ovalbutton" href="<?php echo JRoute::_($this->posturl . 'list&forum=' . ((int)$this->items[0]->forum_id) . '&topic=' . ((int)$this->items[0]->topic_id)); ?>"> <span><?php echo JText::_('CANCEL'); ?></span> </a> </td>
            </tr>
            <tr>
              <td class="ybbmovcap"><br />
              <td></td>
            </tr>
          </table></td>
        <td class="ybbrightbody"></td>
      </tr>
      <tr class="ybbtablefooter">
        <td class="ybbbotleft"></td>
        <td class="ybbbotmiddle"></td>
        <td class="ybbbotright"></td>
      </tr>
      <tr>
        <td colspan="3" class="ybbcolspacer"></td>
      </tr>
    </table>
  </div>
  <input type="hidden" name="option" value="com_yarbb" />
  <input type="hidden" name="task" value="postReport" />
  <input type="hidden" name="<?php echo JUtility::getToken(); ?>" value="1" />
</form>
<br/>
<br/>
<?php echo YARBB_COPYRIGHT; ?> <br/>
<br/>
